
pkgname=tzdata
pkgver=2018e
pkgrel=1
pkgdesc="Sources for time zone and daylight saving time data"
arch=('x86_64')
url="http://www.iana.org/time-zones"
license=('GPL')
options=('!emptydirs')
source=("http://www.iana.org/time-zones/repository/releases/${pkgname}${pkgver}.tar.gz")
md5sums=('97d654f4d7253173b3eeb76a836dd65e')

timezones=('africa' 'antarctica' 'asia' 'australasia'
           'europe' 'northamerica' 'southamerica'
           'etcetera' 'backward'
           'systemv' 'factory')

package() {
  cd ${srcdir}
  zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo ${timezones[@]}
  zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo/posix ${timezones[@]}
  zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo/right -L leapseconds ${timezones[@]}
  zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo -p America/New_York
  install -m444 -t ${pkgdir}/usr/share/zoneinfo iso3166.tab zone.tab zone1970.tab
}
